If you are connecting from the US, in the next section you want to use the api.binance.us endpoint instead of binance.api.com (see the reference solution on GitHub)
api.binance.us
binance.api.com
url = f"https://api.binance.us/api/v3/ticker/price?symbol={symbol}"